package com.yx.cloud.map.layer;

import android.graphics.BitmapFactory;

import com.aaa.lib.map.MapView;
import com.yx.cloud.R;
import com.yx.cloud.map.YXMapView;

public class YXForbiddenMopAreaLayer extends YXForbiddenAreaLayer {
    private static final String TAG = "YXForbiddenLineLayer";
    public static boolean isForbiddenMopEditable = false;

    public YXForbiddenMopAreaLayer(MapView mapView) {
        super(mapView);
        deleteIcon = BitmapFactory.decodeResource(mapView.getContext().getResources(), R.mipmap.restrict_mop_delete);
        rotateIcon = BitmapFactory.decodeResource(mapView.getContext().getResources(), R.mipmap.restrict_mop_rotate);
        scaleIcon = BitmapFactory.decodeResource(mapView.getContext().getResources(), R.mipmap.restrict_mop_drag);
        bgColor=mResource.getColor(R.color.restrict_area_mop_fill);
        borderColor=mResource.getColor(R.color.restrict_area_mop_stroke);
    }

    @Override
    public boolean isEditable() {
        return isForbiddenMopEditable;
    }

    public void initAreaLayer() {
        super.initAreaLayer();
        areaInfo.setId(((YXMapView) mMapView).getUniqueAreaId(YXAreaLayer.TYPE_FORBIDDEN_MOP));
        areaInfo.setType(YXAreaLayer.TYPE_FORBIDDEN_MOP);
        areaInfo.setName("forbidMop-" + areaInfo.getId());
    }
}
